package com.example.myapplication.dao;

import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.Query;

import com.example.myapplication.entity.User;

import java.util.List;

@Dao
public interface UserDao {

    @Query("select * from User")
    List<User> loadAllUser();

    @Query("select * from User where name=:name and password=:pwd")
    List<User> getUser(String name, String pwd);

    @Insert
    void insertUser(User user);

    @Insert
    void insertUser(List<User> users);
}
